<?php

require 'conn.php';

require 'config.php';

require 'inc/function.php';

$ye='about';
 if($id=='')
{
$id=RsField('select a_id from '.$language.'_about_image_class order by a_order,a_id asc limit 1');
}

$classname=RsField('select a_name from '.$language.'_about_image_class where a_id='.$id.'')


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=1200,initial-scale=0.3,maximum-scale=1.0,user-scalable=yes" />
<?php 
$query=mysql_query('select * from '.$language.'_keywords where k_id=1',$conn);
$row=mysql_fetch_array($query);

$k_name=$row['k_name'];

$k_keyword=$row['k_keyword'];

$k_description=$row['k_description'];
?>
<title><?php echo $classname."-". $k_name?></title>
<meta name="keywords" content="<?php echo $k_keyword?>" />
<meta name="description" content="<?php echo $k_description?>" />
 <link rel="stylesheet" rev="stylesheet" href="css/global.css" />

<link rel="stylesheet" rev="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/jq_min.js"></script>
<link rel="stylesheet" href="js/lightbox.css">
 <script src="js/jquery-1.11.0.min.js"></script>
<script src="js/lightbox.js"></script>
 
 </head>
<body>
<!-- haeder S-->
<?php require 'header.php'?>
 
<div id="ban" style="background:url(<?php echo RsField('select b_image from '.$language.'_banner where b_id=1')?>) center no-repeat;"></div>

        <div id="center">
        	<div class="main clear_both">
             	<div class="left fl">
	    <div class="about">关于我们   </div>
    <div class="list">
        <ul>
        	          
                 <?php
                  $str='';

		$query=mysql_query('select a_id,a_name from '.$language.'_aboutus order by a_order asc');

		if (mysql_num_rows($query)>0){

		while($row=mysql_fetch_array($query)){
			$str.=' <li>';
			 
			  $str.=' <div class="senior">';

				 
			   $str.='<a href="aboutus.php?id='.$row['a_id'].'">'.$row['a_name'].'</a> </div></li> ';
		}

		}
		$query=mysql_query('select a_id,a_name from '.$language.'_about_image_class order by a_order asc');

		if (mysql_num_rows($query)>0){

		while($row=mysql_fetch_array($query)){
if ($row['a_id']==$id)
{
		$str.='<li ><div class="senior on"><a href="img.php?id='.$row['a_id'].'">'.$row['a_name'].'</a></div></li>';
	}
else
{
		$str.='<li> <div class="senior"><a href="img.php?id='.$row['a_id'].'">'.$row['a_name'].'</a></div></li>';
	}
	
 		}

		}
		
				 echo $str;
				  ?>
               
                    </ul>
    </div>
 
    

</div> 
            	<div class="right fr clear_both">
                	<div class="mbx fl">
                      <div class="mbtitle"><?php echo $classname?></div>
                <div class="mbtitle2">当前位置：<a href="index.php">首页</a>&gt;<a href="aboutus.php">关于我们</a>&gt;<?php echo $classname?></div>
    
    </div> 
                    <div class="clear"></div>
                    <div class="info_list5">
                    	
                         <?php
	$str='';

		  $page_sql='select * from '.$language.'_about_image where a_class='.$id.'  order by a_order';

 		$page_size=12;
		$page_count=GetPageCount($page_size,$page_sql);
		if ($page>$page_count) $page=$page_count;
		$page_number=($page-1)*$page_size;
		$query=mysql_query($page_sql." limit $page_number,$page_size",$conn);
		if (mysql_num_rows($query)==0){
			$str.=NoData($language);
		}
		else{
		
			$str.=' <ul class="clear_both">';
			$i=1;
			while($row=mysql_fetch_array($query)){
				if($i %3==0)
				{
					$str.='<li class="fl clear_both" style="margin-right:0px;">';
					}
				else
				{
					$str.='<li class="fl clear_both">';
					}
			 $str.='
                            	 <a href="'.$row['a_image'].'" class="example-image-link"   data-lightbox="example-1" rel="gallery-module-0" title="'.$row['a_name'].'" >
                                    	<img src="'.$row['a_image'].'" /><br>'.$row['a_name'].'
                                    </a>
                            </li>';
			 
				$i++;
			}
			$str.='</ul>';
			
			if ($page_count>1) $str.='<div id="turn_page">'.ShowPage3($page,$page_count,$language).'</div>';
		}
		echo $str;
		?>
          
                    </div>
                </div>   
            </div>
        </div>
        
        
<?php require 'footer.php'?>


</body>
</html>

